Repository navigation
Use native submenus for new-tab agent setup - #37576
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
… submenu The @ and / suggestion list lifts itself to the menu layer only inside a popover. Since #37576 the new-tab agent setup is a dropdown submenu on the same z-[70] layer, so the list stayed at z-50 and drew behind it.
ELI5
The new-tab agent picker now opens a native submenu from the separate right-hand chevron. Launch buttons have equal dimensions, with Enter for the default mode and Cmd+Enter (Mac) or Ctrl+Enter (Windows/Linux) for the alternative.
What Changed
>opens options. Hovering the name/icon keeps options closed; clicking the main item launches its default mode. The whole row highlights, and the chevron uses the normal neutral filled-button colors on hover, keyboard focus, and while open.ShortcutKeyCombo, with platform-appropriate modifier labels and accessible shortcut metadata.Why
The picker needs the placement and navigation users expect from a cascading menu, while preserving one-click default launching. Matching launch buttons and visible shortcuts make both launch modes discoverable.
Visual Proof
Captured through Playwright CDP in the hidden Electron renderer using the visual-proof and electron skills. Workspace
nwparker/tab-menu-2, viewport 1728×1080, 710×530 crops following the submenu. The current captures include the loaded model list.Light mode, opened with Right Arrow and model search focused:
Windows modifier labels, emulated through the renderer user agent on macOS (not native Windows validation):
Testing
Final GitHub CI on
87b8f176863: full PR workflow passed, including all 12 unit-test shards, static analysis/typecheck, macOS and Windows package builds, selection evidence, and thePR checks passedaggregate gate.CI follow-up: all 42 tests in the two failing launch integration/search files pass after selecting launch buttons by accessible name. Updated the drag regression to include the resulting click, and added wheel-highlight and left-opening pointer-grace coverage; 53 related pointer/menu tests pass.
Hidden Electron follow-up: main hover stays closed, chevron hover focuses search, Left/Right returns/reopens, dragging onto the chevron does not launch, wheel scrolling focuses the row under the pointer, and a collision-flipped submenu stays open while crossing another row.
150 scoped tests across 13 files covering picker setup, launch choices, prompt retention, inventory freshness, submenu navigation, pointer handoff, and highlighting. Includes 25 shortcut cases across Mac/Windows/Linux labels and bindings, both default modes, prompt/search/Arguments focus, empty prompts, and guarded states.
Hidden Electron: Cmd+Enter from Codex model search opened the alternative Codex Chat tab. Equal button dimensions verified in dark/light mode (141.703125 × 24 px), Windows label emulation (151.6875 × 24 px), and a 600×800 viewport (137.5 × 24 px).
Electron: chevron-only opening, whole-row highlighting, matching neutral hover/keyboard fill, search autofocus, Right/Left/Right navigation, typed-search caret behavior, Arguments/prompt editing, and narrow collision placement.
Commit hooks passed lint, AST checks, and formatting.
pnpm check:changed --maxWorkers=2 --timeout=2: all 23 non-test checks passed, including Node/web typechecks, changed-code quality, formatting, localization, and ratchets. The broad related test selection exceeded the two-minute cap; the 150-test scoped suite passed. The full selection and package builds subsequently passed in GitHub CI.Native rendered validation was on macOS. Windows/Linux shortcut behavior is covered by tests; Windows labels were also renderer-emulated. Live SSH and native Windows/Linux were not exercised. This change uses the existing host-independent launch path and adds no new persistence or platform process behavior.
Risk
Level: Medium. Focus transitions and shortcut routing could affect submenu dismissal, nested controls, or launch choice. Focused tests and the actual Electron flow cover those paths. A plain revert restores the prior menu; no data migration is involved.
Review